@import 'modules/animation';
@import 'util/mixins';

$green: #2ecc71;
$greenDark: #27ae60;
$greenBg: #2ecc71;
$greenBgHover: #27ae60;
$greenText: #2ecc71;
$blueBg: #3498db;

body {
  font-family: "Noto Sans", "Hiragino Sans GB", "Century Gothic", system, Arial, Verdana, Tahoma, "微软雅黑";
}

.heading {
  font-family: Helvetica, Tahoma, Arial, STXihei, "华文细黑", SimSun, "宋体", Heiti, "黑体", sans-serif;
}

.title-bar {
  position: relative;
  height: 4rem;
  line-height: 4rem;
  padding: 0 1rem;
  background-color: $greenBg;
  nav {
    display: inline-block;
    width: 4rem;
    height: 4rem;
    overflow: hidden;
    margin-left: -1rem;
    a {
      display: block;
      width: 100%;
      height: 100%;
      text-align: center;
      font-size: 1.6rem;
      color: #fff;
    }
  }
  .heading {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 4rem;
    line-height: 4rem;
    text-align: center;
    color: #fff;
    font-size: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.app-page {
  margin: 0 auto;
  max-width: 640px;

  .loading {
    position: relative;
    .spinner {
      position: absolute;
      left: 50%;
      top: 100px;
      -webkit-transform: translateX(-50%);
      transform: translateX(-50%);
      display: block;
      margin-left: -16px;
      width: 32px;
      height: 32px;
      background: url(../images/loading-blue@2x-78fefc5c7ae7e3fc7893e376842d93bf.png) no-repeat center center;
      background-size: 32px 32px;
      -webkit-animation-name: rotateLoading;
      animation-name: rotateLoading;
      -webkit-animation-duration: 1s;
      animation-duration: 1s;
      -webkit-animation-iteration-count: infinite;
      animation-iteration-count: infinite;
      -webkit-animation-timing-function: linear;
      animation-timing-function: linear;
    }
  }
}

.app-container {
  padding-right: 15px;
  padding-left: 15px;
}

.list {
  list-style: none;
  padding: 0;

  .list-item {
    padding: 8px 1rem;
  }
}

.test-group-list {
  padding: 8px 1rem;

  .question {
    background: #fff;
    .heading {
      margin-top: .5rem;
      margin-bottom: .5rem;
      font-size: 1.6rem;
    }
  }
}

.test-paper {
  .top-bar {
    display: flex;
    position: relative;
    height: 48px;
    background-color: #fafafa;
    border-bottom: 1px solid #ccc;
    @include clearfix();
    nav {
      display: inline-block;
      float: left;
      width: 48px;
      height: 48px;
      line-height: 48px;
      background-color: $greenBg;
      a {
        display: block;
        width: 100%;
        height: 100%;
        text-align: center;
        color: #fff;
      }
    }
    .wrap {
      position: relative;
      top: 0;
      left: 0;
      flex: auto;
    }
    .metas {
      position: absolute;
      z-index: 1;
      padding-left: 1rem;
      padding-right: 1rem;
      width: 100%;
      height: 48px;
      line-height: 48px;
      font-size: 16px;
      color: #666;
      .index-number {
        padding-left: .5em;
        padding-right: .5em;
      }
      .meta {
        text-indent: 48px;
      }
    }
    .progress-bar {
      position: absolute;
      z-index: 0;
      width: 0;
      height: 48px;
      opacity: .2;
      background-color: $blueBg;
    }
  }
  .bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    line-height: 48px;
    background-color: #fafafa;
    border-top: 1px solid $greenDark;
    border-bottom: 1px solid $greenDark;
    .btn-wrap {
      padding-left: 2rem;
      padding-right: 2rem;
      background-color: $greenBg;
      .btn-flat {
        &[disabled] {
          background-color: #dfdfdf;
          color: #888;
          &:hover {
            background-color: #dfdfdf;
            color: #888;
          }
        }
      }
      .btn-prev-question, .btn-next-question {
        display: inline-block;
        height: 46px;
        border-radius: 0;
        text-align: center;
        background-color: $greenBg;
        color: #fff;
        &:hover {
          background-color: $greenBgHover;
        }
      }
    }
  }
  .question-list {
    .heading {
      margin-top: .5rem;
      margin-bottom: .5rem;
      font-size: 2rem;
    }
    .question {
      position: relative;
      width: 100%;
      .handle-board {
        position: absolute;
        bottom: 0px;
        left: 0;
        width: 100%;
      }
    }
    .option-list {
      .option-item {
        position: relative;
        border-bottom: 1px dashed #c0c0c0;
        &:last-child {
          border-bottom: 0 none;
        }
      }
      .option-content {
        vertical-align: middle;
        padding-top: 15px;
        padding-left: 50px;
        padding-bottom: 15px;
        padding-right: 15px;
        font-size: 1.6rem;
        background-color: #fafafa;
      }
      .select-icon {
        position: absolute;
        top: 18px;
        left: 18px;
        color: #95a5a6;
      }
      .selected {
        .option-content {
          color: #fff;
          background-color: $greenBg;
        }
        .select-icon {
          color: #fff;
        }
      }
    }
  }
}

.scoreboard {
  padding-top: 15px;
  padding-bottom: 15px;
  .score-title {
    margin-top: 0;
  }
}